3.7 \(\int \sin (a+b x) \sin (2 a+2 b x) \, dx\)

Optimal. Leaf size=30 \[ \frac {\sin (a+b x)}{2 b}-\frac {\sin (3 a+3 b x)}{6 b} \]

[Out]

1/2*sin(b*x+a)/b-1/6*sin(3*b*x+3*a)/b

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {4282} \[ \frac {\sin (a+b x)}{2 b}-\frac {\sin (3 a+3 b x)}{6 b} \]

Antiderivative was successfully verified.

[In]

Int[Sin[a + b*x]*Sin[2*a + 2*b*x],x]

[Out]

Sin[a + b*x]/(2*b) - Sin[3*a + 3*b*x]/(6*b)

Rule 4282

Int[sin[(a_.) + (b_.)*(x_)]*sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[a - c + (b - d)*x]/(2*(b - d)), x]
- Simp[Sin[a + c + (b + d)*x]/(2*(b + d)), x] /; FreeQ[{a, b, c, d}, x] && NeQ[b^2 - d^2, 0]

Rubi steps

\begin {align*} \int \sin (a+b x) \sin (2 a+2 b x) \, dx &=\frac {\sin (a+b x)}{2 b}-\frac {\sin (3 a+3 b x)}{6 b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 15, normalized size = 0.50 \[ \frac {2 \sin ^3(a+b x)}{3 b} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[a + b*x]*Sin[2*a + 2*b*x],x]

[Out]

(2*Sin[a + b*x]^3)/(3*b)

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 21, normalized size = 0.70 \[ -\frac {2 \, {\left (\cos \left (b x + a\right )^{2} - 1\right )} \sin \left (b x + a\right )}{3 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(2*b*x+2*a),x, algorithm="fricas")

[Out]

-2/3*(cos(b*x + a)^2 - 1)*sin(b*x + a)/b

________________________________________________________________________________________

giac [A]  time = 0.32, size = 26, normalized size = 0.87 \[ -\frac {\sin \left (3 \, b x + 3 \, a\right )}{6 \, b} + \frac {\sin \left (b x + a\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(2*b*x+2*a),x, algorithm="giac")

[Out]

-1/6*sin(3*b*x + 3*a)/b + 1/2*sin(b*x + a)/b

________________________________________________________________________________________

maple [A]  time = 0.48, size = 27, normalized size = 0.90 \[ \frac {\sin \left (b x +a \right )}{2 b}-\frac {\sin \left (3 b x +3 a \right )}{6 b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(b*x+a)*sin(2*b*x+2*a),x)

[Out]

1/2*sin(b*x+a)/b-1/6*sin(3*b*x+3*a)/b

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 26, normalized size = 0.87 \[ -\frac {\sin \left (3 \, b x + 3 \, a\right )}{6 \, b} + \frac {\sin \left (b x + a\right )}{2 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(2*b*x+2*a),x, algorithm="maxima")

[Out]

-1/6*sin(3*b*x + 3*a)/b + 1/2*sin(b*x + a)/b

________________________________________________________________________________________

mupad [B]  time = 0.36, size = 44, normalized size = 1.47 \[ \left \{\begin {array}{cl} 2\,x\,\left (\cos \relax (a)-{\cos \relax (a)}^3\right ) & \text {\ if\ \ }b=0\\ \frac {3\,\sin \left (a+b\,x\right )-\sin \left (3\,a+3\,b\,x\right )}{6\,b} & \text {\ if\ \ }b\neq 0 \end {array}\right . \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(a + b*x)*sin(2*a + 2*b*x),x)

[Out]

piecewise(b == 0, 2*x*(cos(a) - cos(a)^3), b ~= 0, (3*sin(a + b*x) - sin(3*a + 3*b*x))/(6*b))

________________________________________________________________________________________

sympy [A]  time = 0.81, size = 51, normalized size = 1.70 \[ \begin {cases} - \frac {2 \sin {\left (a + b x \right )} \cos {\left (2 a + 2 b x \right )}}{3 b} + \frac {\sin {\left (2 a + 2 b x \right )} \cos {\left (a + b x \right )}}{3 b} & \text {for}\: b \neq 0 \\x \sin {\relax (a )} \sin {\left (2 a \right )} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(b*x+a)*sin(2*b*x+2*a),x)

[Out]

Piecewise((-2*sin(a + b*x)*cos(2*a + 2*b*x)/(3*b) + sin(2*a + 2*b*x)*cos(a + b*x)/(3*b), Ne(b, 0)), (x*sin(a)*
sin(2*a), True))

________________________________________________________________________________________